<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        var str1 = "10";
        var res1 = 10 + str1;
        console.log(res1);

        var str2 = "10";
        var res2 = 10 + Number.parseInt(str2);
        console.log(res2);
    </script>
</head>
<body>
    
</body>
</html>